<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Job Management</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-edit.css"
	type="text/css">
<script src="../../../script/base.js"></script>
<body>
<f:view>
	<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
	<h:form id="myForm">
		<h:inputHidden value="#{job.content.pk}" id="pk" />
		<h:inputHidden value="#{job.editMode}" id="editMode" />

		<h:panelGrid columns="2" rowClasses="content-title"
			style="width:100%;">
			<h:outputText value="#{msg.job_title}." />

			<h:panelGroup style="text-align:right">
				<h:commandButton value="#{msg.common_edit}" type="submit" id="cmdEdit"
					action="#{job.edit}" styleClass="button-normal"
					rendered="#{not job.editMode}" />

				<h:commandButton value="#{msg.common_save}" type="submit" id="cmdSave"
					action="#{job.save}" styleClass="button-normal"
					rendered="#{job.editMode}" />

				<h:outputText value="    " />
				<h:commandButton value="#{msg.common_cancel}" type="submit" id="cmdCancel"
					action="#{job.back}" styleClass="button-normal" />
			</h:panelGroup>
		</h:panelGrid>

		<hr>

		<h:messages styleClass="content-message" />

		<h:panelGrid columns="2" styleClass="content-table"
			columnClasses="content-detail-title,content-detail">

			<h:outputLabel value="#{msg.common_pk}:" />
			<h:outputText value="#{job.content.pk}" />

			<h:outputLabel value="#{msg.job_code}:" />
			<h:inputText value="#{job.content.code}" id="code"
				disabled="#{not job.editMode}" style="width:180px" />

			<h:outputLabel value="#{msg.job_name}:" />
			<h:inputText value="#{job.content.name}" id="name"
				disabled="#{not job.editMode}" style="width:180px" />

			<h:outputLabel value="&nbsp;" />
			<h:outputLabel value="&nbsp;" />

			<h:outputLabel value="#{msg.job_start}:" />
			<h:inputText value="#{job.content.starttime}" id="starttime"
				disabled="#{not job.editMode}" style="width:180px">
				<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
			</h:inputText>


			<h:outputLabel value="#{msg.job_interval}:" />
			<h:panelGrid columns="2" columnClasses="content-detail">
				<h:inputText value="#{job.content.interval_hour}"
					style="width:150px" disabled="#{not job.editMode}"
					id="interval_hour" />
				<h:outputLabel value="Hour." />
			</h:panelGrid>

			<h:outputLabel value="#{msg.job_status}:" />
			<h:selectOneMenu value="#{job.content.status}" id="status"
				disabled="#{not job.editMode}">
				<f:selectItems value="#{job.statuslist}" />
			</h:selectOneMenu>


			<h:outputLabel value="&nbsp;" />
			<h:outputLabel value="&nbsp;" />

			<h:outputLabel value="#{msg.job_description}:" />
			<h:inputTextarea value="#{job.content.description}" id="description"
				style="width:360px" rows="3" disabled="#{not job.editMode}" />

			<h:outputLabel value="#{msg.job_program}:" />
			<h:inputTextarea value="#{job.content.program}" id="program"
				style="width:360px" rows="10" disabled="#{not job.editMode}" />

		</h:panelGrid>
	</h:form>
</f:view>
</body>
</html>
